package com.xuelang.pipeline.infrastructure.resource.converter;

import com.xuelang.pipeline.domain.resource.Environment;
import com.xuelang.pipeline.infrastructure.resource.dataobject.EnvironmentDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 环境实体与环境DO转换器类
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
@Mapper
public interface EnvironmentToEnvironmentDOConverter {

    EnvironmentToEnvironmentDOConverter INSTANCE = Mappers.getMapper(EnvironmentToEnvironmentDOConverter.class);

    /**
     * Environment转化为EnvironmentDO
     * @param environment
     * @return
     */
    EnvironmentDO environmentToEnvironmentDO(Environment environment);

    /**
     * EnvironmentDO转化为Environment
     * @param environmentDO
     * @return
     */
    Environment environmentDOToEnvironment(EnvironmentDO environmentDO);

}
